<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss2"/>
    <title>分类设置</title>
</head>
<body>

<div class="layui-fluid">


    <div class="layui-card">

        <form method="post" action="" class="layui-form" lay-filter="zmn-form">
            <input type="hidden" name="trackId" th:value="${vo.trackId}">

            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">跟单类型：</label>
                <div class="layui-input-inline" style="width: 300px;">
                    <select id="categId" name="categId" value="0" lay-search="" lay-verify="required">
                        <option value="">-选择-</option>
                        <zmn th:each="categ:${categList}">
                            <option th:title="${categ.categName}" th:value="${categ.categId}" th:selected="${vo.categId == categ.categId}" th:text="${categ.categName}"></option>
                        </zmn>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label  layui-form-required">跟单内容：</label>
                <div class="layui-input-inline" style="    width: 300px;">
                    <input lay-verify="required" id="trackContent" type="text" name="trackContent" th:value="${vo.trackContent}" autocomplete="off" class="layui-input" maxlength="15"/>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">跟单缘由：</label>
                <div class="layui-input-inline" style="width: 300px;">
                    <div id="trackReason" name="trackReason"></div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">备注：</label>
                <div class="layui-input-inline">
                    <div class="layui-input-inline" style="width:600px;">
                        <textarea placeholder="500字以内" maxlength="500" th:text="${vo.remark}" id="remark" name="remark"
                                  class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">跟单等级：</label>
                <div class="layui-input-inline" style="width: 20%;">
                    <zmn th:each="level:${levelList}">
                        <input type="radio" name="level" th:value="${level.key}" th:title="${level.value}" th:checked="${vo.level == level.key}" lay-verify="required" >
                    </zmn>
                </div>
                <div class="layui-form-mid layui-word-aux" style="margin-left: -30px;">四级等级最高</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">是否遗留：</label>
                <div class="layui-input-inline">
                    <zmn th:each="legacy:${legacyList}">
                        <input type="radio" name="legacy" th:value="${legacy.key}" th:title="${legacy.value}" th:checked="${vo.legacy == legacy.key}" lay-verify="required" >
                    </zmn>
                </div>
                <div class="layui-form-mid layui-word-aux" style="margin-left: -80px;">是否可以遗留跟单</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">跟单部门：</label>
                <div class="layui-input-inline" style="width: 300px;">
                    <div id="trackDeptId" name="trackDeptId"></div>
                </div>
                <div class="layui-form-mid layui-word-aux">配置跟单部门，可以查看和处理跟单数据</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">订单状态：</label>
                <div class="layui-input-inline" style="width: 300px;">
                    <div id="orderStatus" name="orderStatus"></div>
                </div>
                <div class="layui-form-mid layui-word-aux">选择支持发起该跟单的订单状态，支持多选</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">单据类型：</label>
                <div class="layui-input-inline" style="width: 20%;">
                    <input type="checkbox" name="billType" value="1" title="新单"
                           th:checked="${vo.billType != null && vo.billType.indexOf('1') != -1}">
                    <input type="checkbox" name="billType" value="2" title="返修单"
                           th:checked="${vo.billType != null && vo.billType.indexOf('2') != -1}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">发起人：</label>
                <div class="layui-input-inline" style="width: 30%;">
                    <zmn th:each="operator:${trackOperatorList}">
                        <input type="checkbox" name="trackOperator" th:value="${operator.key}" th:title="${operator.value}"
                               th:checked="${#strings.contains(vo.trackOperator==null?'':vo.trackOperator,operator.key+'')}">
                    </zmn>
                </div>
                <div class="layui-form-mid layui-word-aux" style="margin-left: -25px">表示谁可以发起</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">业务类型：</label>
                <div class="layui-input-inline" style="width: 24%;">
                    <zmn th:each="bizType:${bizTypeList}">
                        <input type="checkbox" name="bizType" th:value="${bizType.key}" th:title="${bizType.value}"
                               th:checked="${#strings.contains(vo.bizType==null?'':vo.bizType,bizType.key+'')}">
                    </zmn>

                </div>
                <div class="layui-form-mid layui-word-aux" style="margin-left: -10px;">表示支持哪种业务类型的工单</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">默认投诉内容：</label>
                <div class="layui-input-inline">
                    <select name="complainOneId" id="complainOneId" lay-filter="complainOneId"  lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.complainOneId}" th:text="${item.text}"
                                th:each="item:${complainOneList}">分类
                        </option>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="complainTwoId" id="complainTwoId" lay-filter="complainTwoId" lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.complainTwoId}" th:text="${item.text}"
                                th:each="item:${complainTwoList}">分类
                        </option>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="complainContentId" id="complainContentId" lay-filter="complainContentId"  lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.complainContentId}" th:text="${item.text}"
                                th:each="item:${complainContentList}">分类
                        </option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">默认异常内容：</label>
                <div class="layui-input-inline">
                    <select name="abnorOneId" id="abnorOneId" lay-filter="abnorOneId" lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.abnorOneId}" th:text="${item.text}"
                                th:each="item:${abnorOneList}">分类
                        </option>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="abnorTwoId" id="abnorTwoId"  lay-filter="abnorTwoId" lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.abnorTwoId}" th:text="${item.text}"
                                th:each="item:${abnorTwoList}">分类
                        </option>
                    </select>
                </div>
                <div class="layui-input-inline">
                    <select name="abnorContentId" id="abnorContentId" lay-filter="abnorContentId"  lay-search="">
                        <option value="">请选择</option>
                        <option th:value="${item.value}" th:selected="${item.value == vo.abnorContentId}" th:text="${item.text}"
                                th:each="item:${abnorContentList}">分类
                        </option>
                    </select>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">完结超时：</label>
                <div class="layui-input-inline">
                    <input  id="trackTimeOut" type="text" lay-verify="positiveOrZero" name="trackTimeOut" th:value="${vo.trackTimeOut}" autocomplete="off" class="layui-input"/>
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span>超过**时间，跟单未完结，则标记为完结超时，单位：分钟</span>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">首次处理超时：</label>
                <div class="layui-input-inline">
                    <input  id="trackFirstHandleTimeOut" type="text" lay-verify="positiveOrZero" name="trackFirstHandleTimeOut" th:value="${vo.trackFirstHandleTimeOut}" autocomplete="off" class="layui-input"/>
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span>跟单生成后，超过**时间未处理跟单，则标记为首次处理超时，单位：分钟</span>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">发起次数上限：</label>
                <div class="layui-input-inline">
                    <input  id="trackFrequencyLimit" lay-verify="positiveOrZero" type="text" name="trackFrequencyLimit" th:value="${vo.trackFrequencyLimit}" autocomplete="off" class="layui-input"/>
                </div>
                <div class="layui-form-mid layui-word-aux">应用于同一订单对该跟单可发起的最大次数，超过后不能继续发起</div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">排序ID：</label>
                <div class="layui-input-inline">
                    <input lay-verify="positive|required" id="sort" type="text" name="sort" th:value="${vo.sort}" autocomplete="off" class="layui-input"/>
                </div>
                <div class="layui-form-mid layui-word-aux">数字越小，越在前面</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">自动完结：</label>
                <div class="layui-input-inline">
                    <input type="radio" name="autoFinish" value="2" title="是" th:checked="${vo.autoFinish == 2}">
                    <input type="radio" name="autoFinish" value="1" title="否"
                           th:checked="${vo.autoFinish == 1 || vo.trackId == null }">
                </div>
                <div class="layui-form-mid layui-word-aux">用于跟单发起后，系统自动完结，无需人工处理</div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">状态：</label>
                <div class="layui-input-inline">
                    <input type="radio" name="status" value="2" title="启用" th:checked="${vo.status == 2}">
                    <input type="radio" name="status" value="1" title="禁用"
                           th:checked="${vo.status == 1 || vo.trackId == null }">
                </div>
            </div>

            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label">解释说明：</label>
                <div class="layui-input-inline">
                    <div class="layui-input-inline" style="width:600px;">
                        <textarea placeholder="500字以内" maxlength="500" th:text="${vo.explanation}" id="explanation" name="explanation"
                                  class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>

            <!--按钮栏
                    置于form标签内的最下方，
                    主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                    -->

            <div class="layui-form-item submit">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                    <button class="layui-btn layui-btn-primary" id="cancleBtn">
                        取消
                    </button>
                </div>
            </div>

            <div class="layui-split">&nbsp;</div>
        </form>
    </div>

</div>





<script type="text/javascript" th:inline="javascript">
    let json = {
        trackDeptId: [[${vo.trackDeptId}]],
        orderStatus: [[${vo.orderStatus}]],
        trackReason: [[${vo.trackReason}]],
        trackId: [[${vo.trackId}]]
    };

    layui.config({
        base: "/static/lay/",
        version: 202007201746
    }).extend({
        index: "lib/index",
        track_detail_js: "orderconfig/track/zmn.plat.orderconfig.track.detail",
    }).use(['index', 'track_detail_js']);
</script>
</body>
</html>